﻿<UserControl
    x:Class="VisibilityDemoApp.OldWay"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:vcl="using:VisibilityControlLibrary">
    <UserControl.Resources>
        <vcl:BooleanToVisibilityConverter
            x:Key="BooleanToVisibilityConverter" />
        <vcl:BooleanToInvisibilityConverter
            x:Key="BooleanToInvisibilityConverter" />
    </UserControl.Resources>
    <StackPanel>
        <CheckBox
            x:Name="MyCheckBox"
            Content="MyCheckBox" />
        <StackPanel
            Orientation="Vertical"
            Visibility="{Binding ElementName=MyCheckBox, Path=IsChecked, Converter={StaticResource BooleanToInvisibilityConverter}}">
            <TextBlock
                Text="This is the false content" />
            <TextBox
                Text="FALSE" />
        </StackPanel>
        <StackPanel
            Orientation="Vertical"
            Visibility="{Binding ElementName=MyCheckBox, Path=IsChecked, Converter={StaticResource BooleanToVisibilityConverter}}">
            <TextBlock
                Text="This is the true content" />
            <TextBox
                Text="TRUE" />
        </StackPanel>
    </StackPanel>
</UserControl>
